use strict;
use warnings;

package Event::Registration;
use base qw(My::DB::Object);

__PACKAGE__->meta->setup(
	table   => 'registration_transaction',
	columns => [
		'id'               => { 'type' => 'serial',    'primary_key' => 1,   'not_null' => 1 },
		'person_id'         => { 'type' => 'int',       'not_null'    => 1 },
		'paid'           => { 'type' => 'boolean',      'not_null'      => 1, 'default' => 0 },
	],
	relationships => [
		registrations => { type => 'one to many',  class => 'Event::Registration::Transaction',  column_map => { 'id'  => 'registration_transaction_id' }, },    
		billable_items     => { type => 'many to many', map_class => 'Event::RegistrationBillableItemMap', map_from => 'registration', map_to => 'billable_item' },
	],
);

1;
